package com.fpx.open.platform.domain.ae;

import java.util.List;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;

import org.hibernate.validator.constraints.NotEmpty;

public class SubOrder {
    /**
     * 物流运单号
     */
    @NotEmpty
    private String mailNo;
    /**
     * 邮件种类 1:礼品 2:商品货样 3:文件 4:其他
     */
    private String mailType;
    /**
     * 国际段承运商
     */
    @NotEmpty
    private String interCarrier;
    /**
     * 交易号
     */
    private String tradeId;
    /**
     * 物流订单号
     */
    private String orderCode;
    /**
     * 小包裹总价格 单位为分
     */
    private Long totalItemPrice;
    /**
     * 运送方式0:空运 1:海运 2:陆运
     */
    private String shipType;
    /**
     * 重量，单位：克
     */
    private Long weight;
    /**
     * 上限重量, 单位：克
     */
    private Long weightLimit;
    /**
     * 说明备注,用来描述内件信息
     */
    private String remark;
    
    /**
     * 发货人信息
     */
    private ContactPerson sendContact;
    /**
     * 收货人信息
     */
    @NotNull
    @Valid
    private ContactPerson receiverContact;
    /**
     * 商品明细
     */
    private List<Item> items;
    
    private String undeliveryOption;
    
    /** 唯一性检查字段 */
    private String uniqueCode;
    
    /** 首次分单：true 二次分单：false */
    private String firstRoute;
    
    /** 国际运单区域编码 */
    private String zoneCode;

    public String getMailNo() {
        return mailNo;
    }

    public void setMailNo(String mailNo) {
        this.mailNo = mailNo;
    }

    public String getMailType() {
        return mailType;
    }

    public void setMailType(String mailType) {
        this.mailType = mailType;
    }

    public String getInterCarrier() {
        return interCarrier;
    }

    public void setInterCarrier(String interCarrier) {
        this.interCarrier = interCarrier;
    }

    public String getTradeId() {
        return tradeId;
    }

    public void setTradeId(String tradeId) {
        this.tradeId = tradeId;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public Long getTotalItemPrice() {
        return totalItemPrice;
    }

    public void setTotalItemPrice(Long totalItemPrice) {
        this.totalItemPrice = totalItemPrice;
    }

    public String getShipType() {
        return shipType;
    }

    public void setShipType(String shipType) {
        this.shipType = shipType;
    }

    public Long getWeight() {
        return weight;
    }

    public void setWeight(Long weight) {
        this.weight = weight;
    }

    public Long getWeightLimit() {
        return weightLimit;
    }

    public void setWeightLimit(Long weightLimit) {
        this.weightLimit = weightLimit;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public ContactPerson getSendContact() {
        return sendContact;
    }

    public void setSendContact(ContactPerson sendContact) {
        this.sendContact = sendContact;
    }

    public ContactPerson getReceiverContact() {
        return receiverContact;
    }

    public void setReceiverContact(ContactPerson receiverContact) {
        this.receiverContact = receiverContact;
    }

    @XmlElementWrapper(name = "items")
    @XmlElement(name = "item")
    public List<Item> getItems() {
        return items;
    }

    public void setItems(List<Item> items) {
        this.items = items;
    }

    @Override
    public String toString() {
        return "SubOrder [mailNo=" + mailNo + ", mailType=" + mailType + ", interCarrier=" + interCarrier
                + ", tradeId=" + tradeId + ", orderCode=" + orderCode + ", totalItemPrice=" + totalItemPrice
                + ", shipType=" + shipType + ", weight=" + weight + ", weightLimit=" + weightLimit + ", remark="
                + remark + ", sendContact=" + sendContact + ", receiverContact=" + receiverContact + ", items=" + items
                + ", undeliveryOption=" + undeliveryOption + "]";
    }

	/**
	 * @return the uniqueCode
	 */
	public String getUniqueCode() {
		return uniqueCode;
	}

	/**
	 * @param uniqueCode the uniqueCode to set
	 */
	public void setUniqueCode(String uniqueCode) {
		this.uniqueCode = uniqueCode;
	}

	/**
	 * @return the firstRoute
	 */
	public String getFirstRoute() {
		return firstRoute;
	}

	/**
	 * @param firstRoute the firstRoute to set
	 */
	public void setFirstRoute(String firstRoute) {
		this.firstRoute = firstRoute;
	}

	/**
	 * @return the zoneCode
	 */
	public String getZoneCode() {
		return zoneCode;
	}

	/**
	 * @param zoneCode the zoneCode to set
	 */
	public void setZoneCode(String zoneCode) {
		this.zoneCode = zoneCode;
	}

	/**
	 * @return the undeliveryOption
	 */
	public String getUndeliveryOption() {
		return undeliveryOption;
	}

	/**
	 * @param undeliveryOption the undeliveryOption to set
	 */
	public void setUndeliveryOption(String undeliveryOption) {
		this.undeliveryOption = undeliveryOption;
	}

}
